package day240308.e2;

public class Student {
    //state
    String name;
    int id;
    //private static final Student instance = new Student();
    private static Student instance;

    private Student() {
        System.out.println("====");
    }

    //behavior

    public static Student getInstance() {
        if (instance == null)
            instance = new Student();
        return instance;
    }

}
